{include file="index/head" /}
<div class="box auto">
  <form method="post" action="{:url('index')}" class="sycmsform">
    <div class="box-head"> 生成首页 </div>
    <div class="form">
      <ul>
      <li>
          <label>生成电脑端或移动端：</label>
          <div class="item">
            <div class="select"><i class="icon-caret-down"></i>
              <input type="hidden" name="htmlpath" value="0" class="inputval" />
              <input type="text" readonly="readonly" class="input"  placeholder="请选择生成电脑端或移动端"/>
              <dl class="select-value syui-anim syui-anim-up">
                <dd data="0" class=selected>电脑端</dd>
                <dd data="1">移动端</dd>
              </dl>
            </div>          
          </div>
        </li>
        <li>
          <label>首页文件：</label>
          <div class="item">
            <input type="text" name="name" value="index.html" readonly="readonly" class="input" />
          </div>
        </li>
        <li>
          <label>&nbsp;</label>
          <div class="item">
            <button type="submit" class="button"><i class="icon-check"></i>点击生成首页</button>
          </div>
        </li>
      </ul>
      <div class="prosss">
         <p></p>
      </div>
    </div>
  </form>
</div>

<script>
$(function(){
	$(".sycmsform:eq(0)").Validform({
		tiptype:3,
		ajaxPost:true,
		beforeSubmit:function(curform){					
			layer.load(1);
		},
		callback:function(data){
			layer.closeAll();		
			if(data.status=="y"){
				layer.alert(data.info, {icon:1},function(){
					layer.closeAll();
				});
			}else{
				layer.alert(data.info, {icon: 2});
			}
		}
	});
})
</script>
